/*
 * @Author: 谢陈洁
 * @Date: 2025-06-26 09:07:10
 * @LastEditors: 谢陈洁
 * @LastEditTime: 2025-07-16 15:55:07
 * @Description: file content
 */

export const formItems = [
  {
    label: '名称',
    prop: 'title',
    placeholder: '请输入名称',
    span: 24,
    rules: [{ required: true, message: '请输入名称', trigger: 'blur' }]
  },
  {
    label: '分类',
    prop: 'category_id',
    type: 'dict-select',
    span: 24,
    rules: [{ required: true, message: '请选择分类', trigger: 'change' }],
    attrs: {
      code: 'article_type'
    }
  },
  {
    label: '标签',
    prop: 'tag',
    type: 'select',
    span: 24,
    attrs: {
      multiple: true,
      filterable: true,
      allowCreate: true,
      allowClear: true
    }
  },
  {
    label: '描述',
    prop: 'description',
    placeholder: '请输入描述',
    span: 24,
    attrs: {
      type: 'textarea'
    },
    rules: [
      {
        required: true,
        message: '请输入描述',
        trigger: 'blur'
      }
    ]
  },
  {
    label: '上传封面',
    prop: 'cover',
    value: [],
    type: 'upload',
    span: 24,
    placeholder: '请上传封面图片，格式为jpg、png、gif',
    attrs: {
      type: 'image/*',
      maxSize: 1024 * 1024 * 5,
      multiple: false,
      limit: 1,
      tips: '请上传封面图片，格式为jpg、png、gif'
    }
  },
  {
    label: '内容',
    prop: 'content',
    placeholder: '请输入内容',
    type: 'md-editor',
    span: 24,
    rules: [
      {
        required: true,
        message: '请输入内容',
        trigger: 'blur'
      }
    ]
  }
]
